import axios from '~/axios'

// 添加购买指标记录
export function addPurchaseIndexRecordApi(data) {
    return axios.post('/basic/lindi/purchaseIndexRecord/addPurchaseIndexRecord', data)
}

// 删除购买指标记录
export function deletePurchaseIndexRecordByPurchaseIndexRecordIdApi(purchaseIndexRecordId) {
    return axios({
        method: 'DELETE',
        url: '/basic/lindi/purchaseIndexRecord/deletePurchaseIndexRecordByPurchaseIndexRecordId',
        params: {
            purchaseIndexRecordId: purchaseIndexRecordId
        }
    })
}

// 修改购买指标记录
export function updatePurchaseIndexRecordByPurchaseIndexRecordIdApi(data) {
    return axios.put('/basic/lindi/purchaseIndexRecord/updatePurchaseIndexRecordByPurchaseIndexRecordId', data)
}

// 分页查询购买指标记录列表
export function getPagePurchaseIndexRecordListApi(params) {
    return axios({
        method: 'GET',
        url: '/basic/lindi/purchaseIndexRecord/getPagePurchaseIndexRecordList',
        params: params
    })
}

// 根据ID查询购买指标记录详情
export function getPurchaseIndexRecordByPurchaseIndexRecordIdApi(purchaseIndexRecordId) {
    return axios.get(`/basic/lindi/purchaseIndexRecord/getPurchaseIndexRecordByPurchaseIndexRecordId/${purchaseIndexRecordId}`)
}

// 根据文件ID删除购买指标记录文件
export function deletePurchaseIndexRecordFileByFileIdApi(fileId) {
    return axios({
        method: 'POST',
        url: '/basic/lindi/purchaseIndexRecord/deletePurchaseIndexRecordFileByFileId',
        params: {
            fileId: fileId
        }
    })
}